package cn.edu.neusoft.cqy917.zyfypt_cqy917.fragment;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import cn.edu.neusoft.cqy917.zyfypt_cqy917.R;
import cn.edu.neusoft.cqy917.zyfypt_cqy917.activity.LoginActivity;
import cn.edu.neusoft.cqy917.zyfypt_cqy917.activity.MycollectActivity;
import cn.edu.neusoft.cqy917.zyfypt_cqy917.activity.MyfocusActivity;



public class Fragment5 extends Fragment {
    Button button6,button7,button8;
    private View view=null;
    private Context context;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        context=getActivity();
        //动态加载Fragment1的布局文件
        view=inflater.inflate(R.layout.fragment5,container,false);
        button6=(Button)view.findViewById(R.id.button6);
        button7=(Button)view.findViewById(R.id.button7);
        button8=(Button)view.findViewById(R.id.button8);

        button6.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(Fragment5.this.getActivity(), MycollectActivity.class);
                startActivityForResult(intent,0);
            }
        });
        button7.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(Fragment5.this.getActivity(),MyfocusActivity.class);
                startActivityForResult(intent,0);
            }
        });
        button8.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(Fragment5.this.getActivity(),LoginActivity.class);
                startActivityForResult(intent,0);
            }
        });

        return view;
    }
}
